package com.yxj04;

import java.io.*;

public class CopyJavaDemo03 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("D:\\Ccode\\jdata-structure\\ByteStream9\\src\\com\\yxj04\\ConversionStreamDemo.java"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("D:\\Ccode\\jdata-structure\\ByteStream9\\copy.java"));
//        int ch;
//        while((ch=br.read())!=-1) {
//            bw.write(ch);
//        }
        char[] chs = new char[1024];
        int len;
        while((len=br.read(chs))!=-1) {
            bw.write(chs,0,len);
        }
        br.close();
        bw.close();
    }
}
